<?php
/**
 * Class descript.
 * User: tsang
 * Date: 2018/3/16 15:29
 */

namespace app\api\controller;

class Personal extends Base
{
    //检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => [
            'except' => 'member_info'//except
        ],
    ];

    //个人中心
    public function personal_center()
    {
        $personal_center =  (new \app\api\logic\Personal())->personal_center();
        return $this->ajaxReturn($personal_center);
    }

    /*
    我的优惠卷
     */
    public function coupon_list()
    {
        $coupon_list =  (new \app\api\logic\Personal())->coupon_list();
        return $this->ajaxReturn($coupon_list);
    }

    /*
    系统生成的优惠卷
     */
    public function system_coupon()
    {
        $system_coupon =  (new \app\api\logic\Personal())->system_coupon();
        return $this->ajaxReturn($system_coupon);
    }

    /*
    领取优惠卷
     */
    public function get_coupon()
    {
        $get_coupon =  (new \app\api\logic\Personal())->get_coupon();
        return $this->ajaxReturn($get_coupon);
    }


    /*
    修改资料
    */
    public function changeInformation()
    {
        $changeInformation =  (new \app\api\logic\Personal())->changeInformation();
        return $this->ajaxReturn($changeInformation);
    }

    /*
    资料详情
    */
    public function userInfomation()
    {
        $userInfomation =  (new \app\api\logic\Personal())->userInfomation();
        return $this->ajaxReturn($userInfomation);
    }

    //绑定
    public function bind(){
        return $this->ajaxReturn(
            (new \app\api\logic\Personal())->bind()
        );
    }

    /*
    系统消息
     */
    public function system_letter()
    {
        $system_letter =  (new \app\api\logic\Personal())->system_letter();
        return $this->ajaxReturn($system_letter);
    }

    /*
    系统详情
     */
    public function system_info()
    {
        $system_info =  (new \app\api\logic\Personal())->system_info();
        return $this->ajaxReturn($system_info);
    }

}